package com.bci.pwtz.mysql.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bci.pwtz.mysql.model.Dygt;

public interface DygtMapper {
    int deleteByPrimaryKey(String deviceid);

    int insert(Dygt record);

    int insertSelective(Dygt record);

    Dygt selectByPrimaryKey(String deviceid);

    int updateByPrimaryKeySelective(Dygt record);

    int updateByPrimaryKey(Dygt record);
    
    List<Dygt> selectDeviceList(@Param("name")String name,@Param("portalType")int portalType,@Param("medLineCodes")String[]medLineCodes,@Param("lineCode")String lineCode,@Param("companyids")String[] companyids,@Param("companyid")Long companyId,@Param("beginTime")String beginTime,@Param("endTime")String endTime,@Param("beginIndex")int beginIndex,@Param("pageSize")int pageSize,@Param("currentDeviceId")String currentDeviceId);
    
    int deleteById(@Param("deviceid")String deviceid,@Param("lastmodifiedtime")Date time);
    
    int selectDeviceCount(@Param("name")String name,@Param("portalType")int portalType,@Param("medLineCodes")String[]medLineCodes,@Param("lineCode")String lineCode,@Param("companyids")String[] companyids,@Param("companyid")Long companyId,@Param("beginTime")String beginTime,@Param("endTime")String endTime);
    
    List<Dygt> getDeviceList(@Param("deviceid")String deviceid);
    
    int getSameTowerNumber(@Param("deviceid")String deviceid);
    
    List<Dygt> getSameTowerList(@Param("deviceid")String deviceid);
    
    int getCompanyTowerCount(@Param("companyid")Long companyId);
    
    List<Dygt> selectByPreDeviceCode(@Param("predevicecode")String predevicecode);
    
    List<Dygt> selectByLineCode(@Param("linecode")String linecode);
    
    List<Dygt> getPhysicalTowerList(@Param("deviceid")String deviceid, @Param("companyid")Long companyid);
    
    int updateLastSyncDevice(@Param("companyId")Long companyId,@Param("lastSyncTime")String lastSyncTime);
}